//封装轮播图业务代码
import { ref, onMounted } from "vue";
import { getBannerApi } from "@/apis/home";
export function useBanner() {
  const bannerList = ref([]);
  //获取banner数据
  const getBanner = async () => {
    const res = await getBannerApi({
      distrbutionSite: "2",
    });
    console.log(res);
    bannerList.value = res.result;
  };
  onMounted(() => {
    getBanner()
  });

  return {
    bannerList
  }
}
